package com.wbs.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class TbUser {
    private Long id;
    private String username;//用户名
    private String password;//密码, 加密存储
    private String salt;//盐
    private String phone;//手机号
    private String email;//邮箱
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
    private Date created;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
    private Date updated;//
    private String sourceType;//会员来源：1:PC，2：H5，3：Android，4：IOS，5：WeChat
    private String nickName;//昵称
    private String name;//真实姓名
    private String status;//使用状态(Y正常, N非正常)
    private String headPic;//头像地址
    private String qq;//QQ号码
    private Long accountBalance;//账户余额
    private String isMobileCheck;//手机是否验证(0否, 1是)
    private String isEmailCheck;//邮箱是否检测(0否, 1是)
    private String sex;//性别, 1男, 2女
    private Integer userLevel;//会员等级
    private Integer points;//积分
    private Integer experienceValue;//经验值
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
    private Date birthday;//生日
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
    private Date lastLoginTime;//最后登录时间
   }